// -*- coding: utf-8 -*- 
/**
 * Project: AlgorithmsLearn
 *
 * @author: yanking
 * Create time: 2022-04-19 14:33
 * IDE: IntelliJ IDEA
 * Introduction:
 */
package com.Test;

import com.DataStruct.Tree.TwoBinaryTree.Node;
import org.junit.jupiter.api.Test;

public class TreeNode {

    Node root;

    class Node {
        int r, l;
        int value;

        public Node(int r, int l, int value) {
            this.r = r;
            this.l = l;
            this.value = value;
        }

        @Override
        public String toString() {
            return "Node{" +
                    "r=" + r +
                    ", l=" + l +
                    ", value=" + value +
                    '}';
        }
    }


    public void constructNode(Node root, int l, int r, int value) {
        if (root == null) {
            root = new Node(l, r, value);
        }
    }

    public Node constructNodeT(Node root, int l, int r, int value) {
        root = new Node(l, r, value);
        return root;
    }

    @Test
    public void shout() {
        root = constructNodeT(this.root, 0, 1, 6);
        System.out.println(root);
    }
}
